<template>
  <div class="detailBtm">
    <div class="btm">
      <p>
        <span @click="back">
          <i class="fa fa-arrow-left"></i>返回
        </span>
        <span @click="home">
          <i class="fa fa-home"></i>首页
        </span>
      </p>
      <button @click="open">立即预定</button>
    </div>
  </div>
</template>

<script>
import bus from "../bus";
export default {
  data() {
    return {};
  },
  methods: {
    look() {
      this.isLook = !this.isLook;
    },
    open() {
      if (this.$store.state.isOnline) {
        $(document.body).css({
          "overflow-x": "hidden",
          "overflow-y": "hidden",
        });
        bus.$emit("kaiValue", true);
      } else {
        location.href = "#/login";
        window.scrollTo(0, 0);
        this.$message({
          message: "你还没有登录",
          type: "error",
        });
      }
    },
    home() {
      location.href = "#/";
      window.scrollTo(0, 0);
    },
    back() {
      history.go(-1);
    },
  },
};
</script>

<style scoped>
.btm {
  width: 100%;
  position: fixed;
  bottom: 0;
  overflow: hidden;
  border-top: solid 1px #f0f0f0;
  padding: 10px 2px;
  background-color: #fff;
}
.btm p {
  float: left;
}
/* 首页，想看 */
.btm p span {
  display: inline-block;
  font-size: 14px;
  margin-left: 20px;
  cursor: pointer;
  margin-top: 10px;
}
.btm p span:first-child {
  border-right: solid 1px #f0f0f0;
  padding-right: 10px;
}
.btm p span i {
  display: block;
  font-size: 25px;
}
.btm button {
  float: right;
  color: #fff;
  background-image: linear-gradient(90deg, #ff7f81, #ff2d79);
  margin-right: 20px;
  border: none;
  padding: 15px 70px;
  border-radius: 50px;
  font-size: 18px;
}
</style>
